package com.fly.modules.sys.controller;

import com.fly.modules.sys.utils.UserUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by SWan on 2017/4/26.
 */
@Controller
@RequestMapping("/")
public class CommonController {

    @RequestMapping(value = "sys/index")
    public ModelAndView homeIndex(String parentId){
        ModelAndView mv = new ModelAndView("modules/sys/sysIndex");
     //   mv.addObject("UserUtils", new UserUtils());
        mv.addObject("parentId", parentId);
        return mv;
    }

    @RequestMapping(value = "sys/tree")
    public ModelAndView tree(String url){
        ModelAndView mv = new ModelAndView("modules/common/treeView");
        mv.addObject("url",url);
        return mv;
    }

}
